Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports System.Security.Cryptography
Imports System.Data.SqlClient
Imports DevComponents.DotNetBar
Imports quanlydulich.Helpers

Public Partial Class FrmDangNhap
    Inherits Office2007Form
    Public Event Handler(ByVal sender As Object, ByVal e As MyEvent)
	Public pressOk As Boolean = False

	Public Sub New()
		InitializeComponent()
	End Sub

	'Click dang nhap
    Private Sub btnDangNhap_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnDangNhap.Click
        pressOk = True
        Me.Close()
        RaiseEvent Handler(Me, New MyEvent(txtUsername.Text.Trim() & "#" & txtPassword.Text.Trim()))
    End Sub

	'Click thoat
    Private Sub btnThoat_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnThoat.Click
        Application.[Exit]()
    End Sub

    Private Sub FrmDangNhap_FormClosed(ByVal sender As Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed
        If Not pressOk Then
            Application.Exit()
        End If
    End Sub
End Class
